<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Video Player</title>
</head>
<body>

<video width="640" height="360" controls>
    <source id="videoSource" src="" type="video/mp4">
    Your browser does not support the video tag.
</video>

<script>
    document.addEventListener('DOMContentLoaded', function() {
        var sId = 1; // 示例学生ID
        var pgId = 4; // 示例项目ID

        // 构造后端接口的URL
        var videoSourceUrl = '/watchVideo?sId=' + sId + '&pgId=' + pgId;

        var videoSource = document.getElementById('videoSource');
        videoSource.src = videoSourceUrl;
    });
</script>
</body>
</html>